package the_eleven_chapter;

import java.net.MalformedURLException;
import java.net.URL;

public class GetURL {

	public static void main(String[] args) throws MalformedURLException {
		URL lib = new URL("http://o2o.explorati.online/o2o/frontend/index");
		System.out.println("协议：" + lib.getProtocol());
		System.out.println("端口：" + lib.getPort());
		System.out.println("主机名：" + lib.getHost());
		System.out.println("文件：" + lib.getFile());
		System.out.println("地址：" + lib.toExternalForm());

	}
}
